let arr1 = [1, 1, 2]
let arr2 = [1, 1, 3]
let sumList = []


for(let i = 0; i < arr1.length; i++){
    for(let j = 0; j < arr2.length; j++){
        sumList.push(arr1[i] + arr2[j])
    }
}

sumList.sort((a, b) => a - b)

let minSum = sumList.slice(0, 2).reduce((sum, value) => sum + value, 0)

console.log(minSum)